#pragma once
#include "MyGraphics.h"

class MyShapes
{
protected:
	int _x;
	int _y;
	int _width;
	int _height;
	char _stroke[3];
	int _strokeWidth;
	char _fill[3];

public:
	MyShapes(int x, int y, int width, int height, char stroke[], int strokeWidth, char fill[])
	{
		_x = x;
		_y = y;
		_width = width;
		_height = height;
		
		for (int i = 0; i < 3; i++)
			_stroke[i] = stroke[i];
		
		_strokeWidth = strokeWidth;
		
		for (int i = 0; i < 3; i++)
			_fill[i] = fill[i];
	}

public:
	MyShapes(void)
	{
		_x = 0;
		_y = 0;
		_width = 0;
		_height = 0;
		_strokeWidth = 0;

		_stroke[0] = 255;
		_stroke[1] = 255;
		_stroke[2] = 255;

		_fill[0] = 0;
		_fill[1] = 0;
		_fill[2] = 0;
	}

	~MyShapes(void)
	{
	}
	

	void SetPosition(int x, int y)
	{
		_x = x;
		_y = y;
	}

	MyPoint GetPosition()
	{
		MyPoint pos;
		pos.x = _x;
		pos.y = _y;

		return pos;
	}

	int GetWidth()
	{
		return _width;
	}

	void SetWidth(int width)
	{
		_width = width;
	}

	int GetHeight()
	{
		return _height;
	}

	void SetHeight(int height)
	{
		_height = height;
	}

	int GetStrokeWidth()
	{
		return _strokeWidth;
	}

	void SetStrokeWidth(int strokeWidth)
	{
		_strokeWidth = strokeWidth;
	}

	void GetStrokeColor(char srcColor[])
	{
		for (int i = 0; i < 3; i++)
			srcColor[i] = _stroke[i];
	}

	void SetStrokeColor(char desColor[])
	{
		for (int i = 0; i < 3; i++)
			_stroke[i] = desColor[i];
	}

	void GetFillColor(char srcColor[])
	{
		for (int i = 0; i < 3; i++)
			srcColor[i] = _fill[i];
	}

	void SetFillColor(char desColor[])
	{
		for (int i = 0; i < 3; i++)
			_fill[i] = desColor[i];
	}

	virtual void Fill(MyGraphics* g) = 0;
	virtual void Draw(MyGraphics* g) = 0;
};

